﻿using Neudesic.Pulse.Entities;
using Neudesic.Pulse.Services;
using Newtonsoft.Json;

namespace Neudesic.Pulse.ViewModels.Design
{
    /// <summary>
    /// Mocked gateway for design-time development that uses some serialized sample resource data.
    /// </summary>
    public class DesignTimePulseGateway : IPulseGateway
    {
        /// <summary>
        /// Creates the status.
        /// </summary>
        /// <param name="status">The status.</param>
        public void CreateStatus(string status)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// Gets the activities.
        /// </summary>
        /// <param name="newer">The newer.</param>
        /// <returns></returns>
        public Entities.PagedActivityList GetActivities(string newer = "")
        {
            return JsonConvert.DeserializeObject<PagedActivityList>(DesignResources.SampleActivityFeed);
        }

        /// <summary>
        /// Gets me.
        /// </summary>
        /// <returns></returns>
        public Entities.Entity GetMe()
        {
            return JsonConvert.DeserializeObject<Entity>(DesignResources.CurrentUser);
        }
    }
}
